<template>
    <div>
        <div class="form-window">
            <div class="form-window-line"></div>
            <div class="form-window-txt">
                <div>被保企业</div>

            </div>

        </div>
        <div class="form-form">
            <el-form label-position="left" label-width="140px" size="small">

                <el-form-item label="企业名称">
                    <div>
                        <el-input v-model="merchant.name" :disabled="edit" placeholder="请输入"
                            class="form-input"></el-input>
                    </div>
                </el-form-item>
                <el-form-item label="统一信用代码">
                    <div>
                        <el-input v-model="merchant.client" :disabled="edit" placeholder="请输入"
                            class="form-input"></el-input>
                    </div>
                </el-form-item>
            </el-form>
            <div class="form-btn-box">
                <el-button size="small" @click="updateInfoItem(11)">修改</el-button>
                <el-button size="small" class="com-btn" @click="saveStorage(11)">保存
                </el-button>
            </div>
        </div>
    </div>
</template>
<script>
export default {
    props: {
        edit: { type: Boolean, default: false },
        merchant: {},
    },
    data() {
        return {
            checked: false,
            tabs: [
                {
                    name: "个人",
                    isActive: true,
                },
                {
                    name: "单位",
                    isActive: false,
                }
            ],
            param: {
                name: "",
                cardType: "身份证",
                card_no: "",
                mobile: "",
                address: "",
                email: ""
            }
        }
    },
    methods: {
        //保存
        saveStorage(index) {
            this.$emit('saveStorage', index)
        },
        clickTabs(index) {
            this.tabs.forEach((item, i) => {
                if (i == index) {
                    item.isActive = true;
                } else {
                    item.isActive = false;
                }
            })
        },
        //勾选
        clickCheck() {
            this.checked = !this.checked
        },
        updateInfoItem(index) {
            this.$emit('updateInfoItem', index)
        }
    }
}
</script>
<style scoped>
@import "../../../assets/css/index/form.css";
</style>